//假设一个已经初始化的Scanner类对象fileScan用于读文件，编写一个while循环，用于计算该文件中每行的平均字符数。
import java.util.Scanner;
import java.io.*;
public class SR5_25
{
  public static void main(String []args) throws IOException
  {
  int numChars = 0;
  int numLines = 0;
  String holdLine;
  Scanner fileScan;
  fileScan = new Scanner(new File("urls.inp"));

  //Read and process each line of the file.
  while (fileScan.hasNext())
  {
    numLines++;
    holdLine = fileScan.nextLine();
    numChars +=holdLine.length();
  }
  System.out.println((double)numChars/numLines);
  }
}  

